package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 销售订单表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:13:53
 */
@Data
@TableName("t_sale_sales_order")
public class SalesOrder implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 销售订单ID
	 */
	@TableId(type = IdType.AUTO)
	private Integer orderId;
	/**
	 * 订单状态,1.审判中、2.已驳回、3.待发货、4.已部分发货、5.已签收、6.已作废、7.已撤销
	 */
	private Integer orderStatusId;
	/**
	 * 订单编号
	 */
	private String orderNumber;
	/**
	 * 客户ID
	 */
	private Long customerId;
	/**
	 * 合同附件
	 */
	private String contractAttachment;
	/**
	 * 预计发货日期
	 */
	private Date expectedDeliveryDate;
	/**
	 * 异常状态
	 */
	private Integer abnormalStateId;
	/**
	 * 下单日期
	 */
	private Date orderDate;
	/**
	 * 销售人
	 */
	private String salesPerson;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 实际发货完成日期
	 */
	private Date actualDeliveryCompletionDate;
	/**
	 * 订单总额
	 */
	private double orderTotalAmount;
	/**
	 * 退款金额
	 */
	private double refundAmount;
	/**
	 * 订单毛利率
	 */
	private double orderGrossMargin;
	/**
	 * 订单总利润
	 */
	private double totalProfit;
	/**
	 * 销售提成
	 */
	private double salesCommission;
	/**
	 * 商品总成本
	 */
	private double totalCostOfGoods;
	/**
	 * 待回款金额
	 */
	private double pendingCollectionAmount;
	/**
	 * 已回款金额
	 */
	private double receivedAmount;
	/**
	 * 待开票金额
	 */
	private double pendingInvoicingAmount;
	/**
	 * 审批人
	 * */
	private String approver;
	/**
	 * 审批时间
	 * */
	private String approvalTime;
	/**
	 * 已开票金额
	 */
	private double invoicedAmount;
	private Date createTime;
	private Date updateTime;
	/**
	 * 销售订单明细关联对象
	 * */
	@TableField(exist = false)
	private List<OrderDetail> orderDetail;
    @TableField(exist = false)
	private String status;
	@TableField(exist = false)
	private SaleCustomer customer;
	@TableField(exist = false)
	private  DictData dictData;

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApprovalTime() {
		return approvalTime;
	}

	public void setApprovalTime(String approvalTime) {
		this.approvalTime = approvalTime;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Integer getOrderStatusId() {
		return orderStatusId;
	}

	public void setOrderStatusId(Integer orderStatusId) {
		this.orderStatusId = orderStatusId;
	}

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public String getContractAttachment() {
		return contractAttachment;
	}

	public void setContractAttachment(String contractAttachment) {
		this.contractAttachment = contractAttachment;
	}

	public Date getExpectedDeliveryDate() {
		return expectedDeliveryDate;
	}

	public void setExpectedDeliveryDate(Date expectedDeliveryDate) {
		this.expectedDeliveryDate = expectedDeliveryDate;
	}

	public Integer getAbnormalStateId() {
		return abnormalStateId;
	}

	public void setAbnormalStateId(Integer abnormalStateId) {
		this.abnormalStateId = abnormalStateId;
	}

	public Date getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}

	public String getSalesPerson() {
		return salesPerson;
	}

	public void setSalesPerson(String salesPerson) {
		this.salesPerson = salesPerson;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getActualDeliveryCompletionDate() {
		return actualDeliveryCompletionDate;
	}

	public void setActualDeliveryCompletionDate(Date actualDeliveryCompletionDate) {
		this.actualDeliveryCompletionDate = actualDeliveryCompletionDate;
	}

	public double getOrderTotalAmount() {
		return orderTotalAmount;
	}

	public void setOrderTotalAmount(double orderTotalAmount) {
		this.orderTotalAmount = orderTotalAmount;
	}

	public double getRefundAmount() {
		return refundAmount;
	}

	public void setRefundAmount(double refundAmount) {
		this.refundAmount = refundAmount;
	}

	public double getOrderGrossMargin() {
		return orderGrossMargin;
	}

	public void setOrderGrossMargin(double orderGrossMargin) {
		this.orderGrossMargin = orderGrossMargin;
	}

	public double getTotalProfit() {
		return totalProfit;
	}

	public void setTotalProfit(double totalProfit) {
		this.totalProfit = totalProfit;
	}

	public double getSalesCommission() {
		return salesCommission;
	}

	public void setSalesCommission(double salesCommission) {
		this.salesCommission = salesCommission;
	}

	public double getTotalCostOfGoods() {
		return totalCostOfGoods;
	}

	public void setTotalCostOfGoods(double totalCostOfGoods) {
		this.totalCostOfGoods = totalCostOfGoods;
	}

	public double getPendingCollectionAmount() {
		return pendingCollectionAmount;
	}

	public void setPendingCollectionAmount(double pendingCollectionAmount) {
		this.pendingCollectionAmount = pendingCollectionAmount;
	}

	public double getReceivedAmount() {
		return receivedAmount;
	}

	public void setReceivedAmount(double receivedAmount) {
		this.receivedAmount = receivedAmount;
	}

	public double getPendingInvoicingAmount() {
		return pendingInvoicingAmount;
	}

	public void setPendingInvoicingAmount(double pendingInvoicingAmount) {
		this.pendingInvoicingAmount = pendingInvoicingAmount;
	}

	public double getInvoicedAmount() {
		return invoicedAmount;
	}

	public void setInvoicedAmount(double invoicedAmount) {
		this.invoicedAmount = invoicedAmount;
	}

	public List<OrderDetail> getOrderDetail() {
		return orderDetail;
	}

	public void setOrderDetail(List<OrderDetail> orderDetail) {
		this.orderDetail = orderDetail;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public SaleCustomer getCustomer() {
		return customer;
	}

	public void setCustomer(SaleCustomer customer) {
		this.customer = customer;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public DictData getDictData() {
		return dictData;
	}

	public void setDictData(DictData dictData) {
		this.dictData = dictData;
	}
}
